<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddAvatarIntoUsers extends Migration
{
    /**
     * Run the migrations.
     * 当goodslist2表已经有数据了，需要修改goodslist2表结构，就需要重新新建迁移文件
     * @return void
     */
    public function up()
    {
        //
        Schema::table('goodslist2',function (Blueprint $table) {
            $table->string('avatar2')->after('goodname')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::table('goodslist2', function (Blueprint $table) {
            $table->dropColumn('avatar');
        });
    }
}
